package com.schoolMall.dto;

/**
 * @author:zyh
 * @Time:2021-08-31-19:41
 * @email:1269231889@qq.com
 */
public class ResultDto<T> {
    private T data;
    private boolean success;
    private String errMsg;
    private int errCode;

    public ResultDto(T data) {
        this.data = data;
        this.success = true;
    }

    public ResultDto(String errMsg, int errCode) {
        this.errCode = errCode;
        this.errMsg = errMsg;
        this.success = false;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public int getErrCode() {
        return errCode;
    }

    public void setErrCode(int errCode) {
        this.errCode = errCode;
    }
}
